const jwt = require('../config/jwt')
module.exports = (req,res,next)=>{
    console.log('req-----------------req',req.headers.token);
    const result = jwt('getjwt',req.headers.token)
    if(result)next()
    else res.json(({
        code: 2002,
        msg: 'token不存在或者失效'
    }))
}